package adapter;

import android.support.annotation.Nullable;
import bean.OrderDetailBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dispatchapp.andlei.R;

import java.util.List;

public class GoodsListAdapter extends BaseQuickAdapter<OrderDetailBean.GoodsListBean, BaseViewHolder> {
    public GoodsListAdapter(int layoutResId, @Nullable List<OrderDetailBean.GoodsListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderDetailBean.GoodsListBean item) {
        helper.setText(R.id.tv_good_name,item.getName());
        helper.setText(R.id.tv_good_num,"x"+item.getNum());
        helper.setText(R.id.tv_good_price,item.getPrice()+"元");
    }
}
